home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
cmdity
/
yk212src.lha
/
Yak_2.12_Src
/
GetPubScreen.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-10-18
|
1KB
|
51 lines
#include <exec/types.h>
#include <intuition/screens.h>
#include <proto/intuition.h>
#include "GetPubScreen.h"
UBYTE
*GetPubScreenName( struct Screen *s)
{
struct List *list; /*NMC*/
struct PubScreenNode *psnode;
UBYTE *PSName;
PSName = NULL;
if (s->Flags & WBENCHSCREEN)
{
PSName = "Workbench";
}
else
{
if (s->Flags & PUBLICSCREEN)
{
/* s is a public screen so find its name */
if (list = LockPubScreenList()) /*NMC*/
{
psnode = (struct PubScreenNode *) list->lh_Head; /*NMC*/
while ((psnode->psn_Node.ln_Succ) && !(PSName)) /*NMC*/
{
if (!(psnode->psn_Flags & PSNF_PRIVATE) && (psnode->psn_Screen == s)) /*NMC*/
{
/* found it */
PSName = psnode->psn_Node.ln_Name;
}
else
{
/* check next one */
psnode = (struct PubScreenNode *)psnode->psn_Node.ln_Succ;
}
}
}
UnlockPubScreenList();
}
}
return(PSName);
}